package com.dragon.repository.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 考勤表
 * </p>
 *
 * @author sy
 * @since 2023-07-10
 */
@Getter
@Setter
@TableName("dragon_attendance")
public class Attendance implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer adminId;

    /**
     * 打卡状态：0未打卡 1.正常 2请假 3异常 4缺卡
     */
    private Integer attendanceType;

    /**
     * 配置id
     */
    private Integer arrangeId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;

    /**
     * 部门id
     */
    private Integer departmentId;

    /**
     * 公司id
     */
    private Integer companyId;

    /**
     * 请假时长（小时）
     */
    private String leaveDuration;

    /**
     * 用户名称
     */
    @TableField(exist = false)
    private String username;

    /**
     * 打卡地址
     */
    @TableField(exist = false)
    private String address;

    /**
     * 外勤打卡标识： 0否 1是
     */
    @TableField(exist = false)
    private Integer isField;


    /**
     * 打卡子表信息
     */
    @TableField(exist = false)
    private List<AttendanceChild> attendanceChildList;

    /**
     * 打卡时间表
     */
    @TableField(exist = false)
    private List<ArrangePeriod> periodList;

    /**
     * 请假信息
     */
    @TableField(exist = false)
    private List<AttendanceLeave> attendanceLeave;

}
